#ifndef BSP_GPIO_H
#define BSP_GPIO_H
#include "sym32l010_hal_sysctrl.h"
#include "sym32l010_hal_systick.h"
#include "sym32l010_hal_gpio.h"

#define Group_GPIOA 0U
#define Group_GPIOB 1U
typedef struct
{
    uint8_t port;
    uint16_t pin;
    uint8_t dir;
    uint8_t output_type;
    uint8_t driver_level;
    uint8_t int_type;
    uint8_t pull;
    uint8_t af;//function select
}bsp_gpio_init_t;

int32_t bsp_gpio_init(bsp_gpio_init_t *init);
int32_t bsp_set_gpio_func(uint8_t port, uint8_t pin, uint8_t func);
void bsp_gpio_write(uint8_t port,uint8_t pin,uint8_t level);
uint8_t bsp_gpio_read(uint8_t port,uint8_t pin);
int32_t bsp_set_gpio_func(uint8_t port, uint8_t pin, uint8_t func);
#endif
